//
//  UploadTweetViewModel.swift
//  Twitter
//
//  Created by Hoa.wang on 2022/4/7.
//

import Foundation

class UploadTweetViewModel: ObservableObject {
    
    @Published var didUploadTweet = false
    
    let service = TweetService()
    
    func uploadTweet(withCaption caption: String) {
        service.uploadTweet(caption: caption) { tweet in
            if let _ = tweet {
                self.didUploadTweet = true
            }
            else {
                
            }
        }
    }
    
}
